package no.ffi.gismoidm.discovery;
/**
 * Parameter class for the discovery service. Observe that this class is used
 * both for announcements and queries.
 * 
 * @author anders
 */
import java.io.Serializable;
public class DiscoveryRequest implements Serializable {
   public static final int ANNOUNCEMENT=1;
   public static final int QUERY=2;
   public int requestType; // ANNOUNCEMENT or QUERY
   // Only one of the following instances are in use
   public DiscoveryQuery query;
   public DiscoveryAnnouncement announcement;
   
   public DiscoveryRequest(DiscoveryQuery d) {
       requestType = QUERY;
       query = d;
   }
   
   public DiscoveryRequest(DiscoveryAnnouncement d) {
       requestType = ANNOUNCEMENT;
       announcement = d;
   }
}
